package com.dongdong.android.framework.mvp;

/**
 * Created by dongdong on 2018/3/26.
 */

public abstract class BasePresenter<E extends BaseModel, T extends BaseView> {

    public E mModel;

    public T mView;

    public RxManager mRxManager = new RxManager();

    public void setVM(T v, E m) {
        this.mView = v;
        this.mModel = m;
        this.onStart();
    }

    // 数据加载初始化
    public abstract void onStart();

    public void onDestroy() {
        mRxManager.clear();
    }
}
